package com.senven.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.senven.common.entity.Permission;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author wt
 * @since 2022-09-05
 */
@TableName("business_type")
@ApiModel(value = "BusinessType对象", description = "")
public class BusinessType implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "btid", type = IdType.AUTO)
    private Integer btid;

    @ApiModelProperty("经营类型")
    private String btname;

    @ApiModelProperty("父级目录的id")
    private Integer mbtid;

    @TableField(exist=false)    //表示此属性不是数据库中的列。
    private List<BusinessType> children;

    public Integer getBtid() {
        return btid;
    }

    public void setBtid(Integer btid) {
        this.btid = btid;
    }
    public String getBtname() {
        return btname;
    }

    public void setBtname(String btname) {
        this.btname = btname;
    }
    public Integer getMbtid() {
        return mbtid;
    }

    public void setMbtid(Integer mbtid) {
        this.mbtid = mbtid;
    }

    public List<BusinessType> getChildren() {
        return children;
    }

    public void setChildren(List<BusinessType> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "BusinessType{" +
                "btid=" + btid +
                ", btname='" + btname + '\'' +
                ", mbtid=" + mbtid +
                ", children=" + children +
                '}';
    }
}
